package com.svms.service.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * @author om39a
 * 
 */
public class VehicleVO implements Serializable {

	public String vehicleId;
	public String vehicleNumber;
	public String model;
	public Map<String, Date> vehicleDocuments;
	public TransportVO transport;
	public String distanceTraveled;
	public ResultCodeVO resultCode;

	public ResultCodeVO getResultCode() {
		if (resultCode == null) {
			resultCode = new ResultCodeVO();
		}
		return resultCode;
	}

	public void setResultCode(ResultCodeVO resultCode) {
		this.resultCode = resultCode;
	}

	public String getVehicleId() {
		return vehicleId;
	}

	public void setVehicleId(String vehicleId) {
		this.vehicleId = vehicleId;
	}

	public String getVehicleNumber() {
		return vehicleNumber;
	}

	public void setVehicleNumber(String vehicleNumber) {
		this.vehicleNumber = vehicleNumber;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public Map<String, Date> getVehicleDocuments() {
		return vehicleDocuments;
	}

	public void setVehicleDocuments(Map<String, Date> vehicleDocuments) {
		this.vehicleDocuments = vehicleDocuments;
	}

	public String getDistanceTraveled() {
		return distanceTraveled;
	}

	public void setDistanceTraveled(String distanceTraveled) {
		this.distanceTraveled = distanceTraveled;
	}

	public TransportVO getTransport() {
		return transport;
	}

	public void setTransport(TransportVO transport) {
		this.transport = transport;
	}

	@Override
	public String toString() {
		return "VehicleVO [vehicleId=" + vehicleId + ", vehicleNumber="
				+ vehicleNumber + ", model=" + model + ", vehicleDocuments="
				+ vehicleDocuments + ", transport=" + transport
				+ ", distanceTraveled=" + distanceTraveled + ", resultCode="
				+ resultCode + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((distanceTraveled == null) ? 0 : distanceTraveled.hashCode());
		result = prime * result + ((model == null) ? 0 : model.hashCode());
		result = prime * result
				+ ((transport == null) ? 0 : transport.hashCode());
		result = prime
				* result
				+ ((vehicleDocuments == null) ? 0 : vehicleDocuments.hashCode());
		result = prime * result
				+ ((vehicleId == null) ? 0 : vehicleId.hashCode());
		result = prime * result
				+ ((vehicleNumber == null) ? 0 : vehicleNumber.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VehicleVO other = (VehicleVO) obj;
		if (distanceTraveled == null) {
			if (other.distanceTraveled != null)
				return false;
		} else if (!distanceTraveled.equals(other.distanceTraveled))
			return false;
		if (model == null) {
			if (other.model != null)
				return false;
		} else if (!model.equals(other.model))
			return false;
		if (transport == null) {
			if (other.transport != null)
				return false;
		} else if (!transport.equals(other.transport))
			return false;
		if (vehicleDocuments == null) {
			if (other.vehicleDocuments != null)
				return false;
		} else if (!vehicleDocuments.equals(other.vehicleDocuments))
			return false;
		if (vehicleId == null) {
			if (other.vehicleId != null)
				return false;
		} else if (!vehicleId.equals(other.vehicleId))
			return false;
		if (vehicleNumber == null) {
			if (other.vehicleNumber != null)
				return false;
		} else if (!vehicleNumber.equals(other.vehicleNumber))
			return false;
		return true;
	}

}
